package com.zy.bean5;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @program: maven3
 * @description: 数据库联接池
 * @author: zy
 * @create: 2025-09-09 16:16
 */
@Component
public class DBPool {

    public DBPool() {
        System.out.println("DBPool构造方法");
    }

    @PostConstruct
    public void init() {
        System.out.println("DBPool初始化方法( 检查 系统资源...)");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("DBPool销毁方法( 释放 系统资源...)");
    }
}
